package cn.gs.service;

import cn.gs.dao.UserDaoImpl;
import cn.gs.entity.User;

import java.util.List;

public class UserServiceImpl {

    // 持有 DAO 层引用（通过依赖注入）
    private UserDaoImpl userDao;

    public UserServiceImpl(){

    }

    public List<User> findUserList(){
        //System.out.println("execute method findUserList");
        return this.userDao.findUserList();
    }

    // Setter 注入方法（与 XML 配置对应）
    public void setUserDao(UserDaoImpl userDao) {
        this.userDao = userDao;
    }
}
